<!--  -->
<template>
  <el-dialog v-bind="$attrs" title="详情" :visible.sync="visibleComputed" width="750px" append-to-body>
    <el-descriptions border>
      <el-descriptions-item label="任务名称">{{ detail.postedTitle }}</el-descriptions-item>
      <el-descriptions-item label="发布人">{{ detail.postedMemberName }}</el-descriptions-item>
      <el-descriptions-item label="地区">{{ detail.postedRegion }}</el-descriptions-item>
      <el-descriptions-item label="任务金额">{{ detail.postedAmount }}</el-descriptions-item>
      <el-descriptions-item label="佣金类型">
        <!-- {{ detail.postedCommissionType }} -->
        <dict-tag :options="dict.type.reward_commission_type" :value="detail.postedCommissionType"/>
      </el-descriptions-item>
      <el-descriptions-item label="佣金金额">
        {{ detail.postedCommissionType === '0'?detail.postedCommissionAmount:detail.postedCommissionRate }}
        <!-- {{ detail.postedCommissionRate }} -->
      </el-descriptions-item>
      <!-- <el-descriptions-item label="佣金数">{{ detail.postedCommissionAmount }}</el-descriptions-item> -->
      <el-descriptions-item label="要求完成时间">{{ detail.postedRequiredTime }}</el-descriptions-item>
      <el-descriptions-item label="承接人押金">{{ detail.postedDeposit }}</el-descriptions-item>
      <el-descriptions-item label="显示时间">
        <dict-tag :options="dict.type.reward_show_day" :value="detail.postedDisplayDuration"/>
        <!-- {{ detail.postedDisplayDuration }} -->
      </el-descriptions-item>
      
      <el-descriptions-item label="承接人">{{ detail.postedDepositId }}</el-descriptions-item>
      <el-descriptions-item label="发布时间">{{ detail.postedTime }}</el-descriptions-item>
      <el-descriptions-item label="任务状态">
        <dict-tag :options="dict.type.reward_task_status" :value="detail.postedStatus"/>
        <!-- {{ detail.postedStatus }} -->
      </el-descriptions-item>
      <el-descriptions-item label="排序顺序">{{ detail.sortOrder }}</el-descriptions-item>
      <el-descriptions-item label="创建时间">{{ detail.createdAt }}</el-descriptions-item>
      <el-descriptions-item label="更新时间">{{ detail.updatedAt }}</el-descriptions-item>
      <el-descriptions-item label="任务内容">{{ detail.postedDescription }}</el-descriptions-item>
  </el-descriptions>
</el-dialog>
</template>

<script>
export default {
  dicts: ['reward_show_day', 'reward_task_status', 'reward_commission_type'],
  components: {},
  props: {
    visible: {
      type: Boolean,
      default: false
    },
    record: {
      type: Object,
      default: () => ({})
    }
  },
  data () {
    return {
    }
  },
  computed: {
    detail() {
      return this.record
    },
    visibleComputed: {
      get() {
       return this.visible;
      },
      set(value) {
        this.$emit('update:visible', value);
      }
    }
  },
  mounted() {},
  methods: {
    
  }
}
</script>
<style lang='scss' scoped>
</style>
